#include "taskitemwidget.h"

TaskItemWidget::TaskItemWidget(QWidget *parent) :
    QWidget(parent)
{
    scene = new QGraphicsScene;

    QGraphicsWidget *t1 = scene->addWidget(new QLabel(tr("Task 1")));
    QGraphicsWidget *cb1 = scene->addWidget(new QCheckBox());

    QGraphicsLinearLayout *linearLayout = new QGraphicsLinearLayout;
    linearLayout->addItem(cb1);
    linearLayout->addItem(t1);

    QGraphicsWidget *form = new QGraphicsWidget;
    form->setLayout(linearLayout);
    scene->addItem(form);

    view = new QGraphicsView(scene);

    QHBoxLayout *mainLayout = new QHBoxLayout;
    mainLayout->addWidget(view);

    setLayout(mainLayout);
}
